package com.song.service;

import com.song.mapper.AdminroleMapper;
import com.song.pojo.Adminrole;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 管理员角色的服务层
 *
 * @author song
 */
@Service
public class AdminroleService {
    @Resource
    private AdminroleMapper adminroleMapper;

    /**
     * 通过主键查询管理员角色信息
     * @param roleId
     * @return
     */
    @Transactional(propagation = Propagation.REQUIRED,readOnly = true)
    public Adminrole queryByroleId(Integer roleId) {
        return adminroleMapper.selectByPrimaryKey(roleId);
    }
}
